package com.baichuan.zntx.domain.vo;

import com.baichuan.common.translation.annotation.Translation;
import com.baichuan.common.translation.constant.TransConstant;
import com.baichuan.zntx.domain.Message;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baichuan.common.excel.annotation.ExcelDictFormat;
import com.baichuan.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 报警消息管理视图对象 t_message
 *
 * @author Baichuan
 * @date 2024-05-11
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = Message.class)
public class MessageVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @ExcelProperty(value = "")
    private String id;

    /**
     * 设备
     */
    @ExcelProperty(value = "设备")
    @Translation(type = TransConstant.DEVICE_ID_TO_CODE)
    private String deviceId;

    /**
     * 消息类型
     */
    @ExcelProperty(value = "消息类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "alert_type")
    private Integer type;

    /**
     * 消息内容
     */
    @ExcelProperty(value = "消息内容")
    private String content;

    /**
     * 状态
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "msg_type")
    private Integer status;

    private Date createTime;

}
